<script setup>
import { computed,ref } from 'vue'
import { valueToPoint } from './util.js'

const props = defineProps({
    stat: Object,
    index: Number,
    total: Number,
    radis: Number
})
const out = ref(10)
const point = computed(() => valueToPoint(props.radis + out.value, props.index, props.total))
</script>
<template>
    <text :x="point.x-out/2" :y="point.y+out/2">{{ stat.label }}</text>
</template>